import axios from 'axios'

export default {
    /**
     * 获取列表数据
     * @param params
     * @returns {AxiosPromise<any>}
     */
    fetch (params) {
        return axios.get('fw/service/order', {
            params: params
        });
    },
    /**
     * 根据id获取详情
     */
    fetchById(id){
        return axios.get(`fw/service/order/${id}`,);
    },
    /**
     * 删除快件
     * @param id
     * @returns {AxiosPromise<any>}
     */
    destroy(id){
        return axios.delete(`fw/service/order/${id}`);
    },
    /**
     * 修改快件信息
     * @param id
     * @param params
     * @returns {AxiosPromise<any>}
     */
    update(id,params){
        return axios.patch(`fw/service/order/${id}`, params);
    },

    /**
     * 获取站点下拉列表
     */
    fetchStations(){
        return axios.post(`fw/service/order/services`);
    }
}
